home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44b.zip / JMPPOS13.QM < prev    next >
Text File  |  1992-06-22  |  34KB  |  713 lines

  1. *                            JMPPOS13.QM, 1.3a
  2. *               Macros To Set and Jump to Position Markers
  3. *                    In Current File and Across Files
  4. *                Written by Tom Hogshead and John Goodman
  5. *                                 6/10/92
  6. *                                                                 Bytes
  7. * Position Markers WITHOUT Extensions . . .                       -----
  8. *  @1    Set Position Marker at Current Line ( )                    13
  9. *  @2    Set Position Marker at Top of Screen                       20
  10. *  @3    Jump to Prev Pos Marker in Current File                    26
  11. *  @4    Jump to Next Pos Marker in Current File                    18
  12. *  @5    Jump to Prev Pos Marker in Loaded Files                    56
  13. *  @6    Jump to Next Pos Marker in Loaded Files                    44
  14. *  @7    Jump to Prev Pos Marker in Current File, Wraps File        34
  15. *  @8    Jump to Next Pos Marker in Current File, Wraps File        29
  16. *  @9    Delete All Position Markers in Current File Only           33
  17. *  @0    Delete All Position Markers in All Loaded Files            38
  18. *
  19. * Position Markers WITH Extensions (In Current File Only) . . .
  20. *  @f1   Set Position Marker at Current Line                        30    |chg
  21. *  @f2   Set Position Marker at Top of Screen                       39    |chg
  22. *  @f3   Jump to Prev Pos Marker                                    70
  23. *  @f4   Jump to Next Pos Marker                                    55
  24. *  @f9   Delete All Position Markers w/Extensions Only              65
  25. *  @f10  Set, Clear or Reset Position Marker Extension              29
  26. *
  27. *  @h    Jump To Macro or Item In Index
  28. *
  29. *        Description of JMPPOS Macros
  30. *        Key Descriptions' Functions
  31. *        Notes
  32. *        Other AMAC Macros
  33. *        Macros
  34. *        Version History
  35. *
  36. *--eoi
  37.  
  38.  
  39. * (Description)
  40. * --------------
  41. *     The following set of QEdit macros provide an alternative to the
  42. *     "Bookmark" macros in BOOKxx.QM.  The JMPPOS macros allow the user
  43. *     to set "Position Markers" at various points in a file, then jump
  44. *     quickly to the next or previous position marker from anywhere in
  45. *     the file.  Position markers are "labels" that are placed on
  46. *     separate lines in file enabling us to jump to the next or
  47. *     previous position marker in any of the currently loaded files
  48. *     (that is, jump across files).
  49.  
  50. *     A typical application of these macros is to set position markers
  51. *     at the top of each function/subroutine in a source code file, or
  52. *     each section and chapter of a documentation file.  The JMPPOS
  53. *     macros will allow you to jump quickly from function to function
  54. *     or section to section by pressing a single key.
  55.  
  56. *     Another application of these macros is to jump quickly between
  57. *     browsing a calling and called function in a source code file.
  58. *     When browsing the calling function, press one of the "Set
  59. *     Position Markers" macro keys to mark the calling function's
  60. *     position.  Then move to the called function and mark it's
  61. *     position in the same way.  You can then quickly alternate between
  62. *     browsing the calling and called functions by pressing one of the
  63. *     "Jump to Next Position Marker" or "Jump to Previous Position
  64. *     Marker" macro keys.
  65.  
  66. *     These macros require QEdit v2.15.
  67.  
  68.  
  69.  
  70. * (Key) Descriptions' Functions
  71. * ------------------------------
  72. *     Following describes the functions of the JMPPOS macro keys.
  73. *     Position markers can be placed in a file (set) using four
  74. *     different macro keys, @1, @2, @f1 or @f2:
  75.  
  76. * @1   -  Sets a position marker one line above the line currently
  77. *         being edited.  This macro key is useful for marking specific
  78. *         line locations in a file that you'll want to jump back to
  79. *         later.
  80.  
  81. * @2   -  Sets a position marker one line above the top line currently
  82. *         displayed on the screen.  This macro key is useful for taking
  83. *         a "snapshot" of the currently displayed screen so that you
  84. *         can return to the location and have the screen displayed just
  85. *         as it was when the position marker was set.  Note that when a
  86. *         position marker is set using this macro key, nothing appears
  87. *         to happen.  This is because the position marker label is
  88. *         placed one line above the first line displayed on the screen
  89. *         and the cursor is returned to it's original position.
  90.  
  91. * 1
  92. * @f1  -  Sets a position marker with a user selected *extension* one
  93. *         line above the line currently being edited.  This macro key
  94. *         is useful for marking specific line locations in a file
  95. *         containing many markers placed with @1 or @2 when the user
  96. *         wishes to jump to and from a recent few markers.  The marker
  97. *         above was inserted invoking @f1 and an extension '1'.
  98.  
  99. * @f2  -  Sets a position marker with a user selected *extension* one
  100. *         line above the top line currently displayed on the screen,
  101. *         like @2, except with an extension.
  102.  
  103.  
  104. * Eight different macro keys are provided to Jump to Position Markers:
  105.  
  106. * @3   -  Jumps to the previous position marker in the file currently
  107. *         being edited.  The macro searches from one line above the
  108. *         line at the top of the screen to the beginning of the file.
  109.  
  110. * @4   -  Jumps to the next position marker in the file currently being
  111. *         edited.  The macro searches from the current cursor location
  112. *         to the end of the file.
  113.  
  114. * @5   -  Jumps to the previous position marker in any of the files
  115. *         that are currently loaded.  The macro first searches from one
  116. *         line above the line at the top of the screen to the beginning
  117. *         of the current file, then searches from bottom to top in the
  118. *         previous file in the file ring, then moves to the nextmost
  119. *         previous file in the ring, etc.  If a position marker is not
  120. *         found in any of the files in the ring, the bottom of the
  121. *         current file is searched.
  122.  
  123. * @6   -  Jumps to the next position marker in any of the files that
  124. *         are currently loaded.  The macro first searches from the
  125. *         current cursor position to the bottom of the current file,
  126. *         then searches from top to bottom in the next file in the file
  127. *         ring, then moves to the next file in the ring, etc.  If a
  128. *         position marker is not found in any of the files in the ring,
  129. *         the top of the current file is searched.
  130.  
  131. * @7   -  Jumps to previous position marker in the file currently being
  132. *         edited.  Wraps within the current file when it hits the *top*
  133. *         of the file (i.e., treat the current file as a "ring" when no
  134. *         marker is found from the starting position to the top of
  135. *         the file).  This way, hitting a jump key will come up with
  136. *         something if there is a marker anywhere in the current file.
  137. *         You don't have to worry about whether you're at the
  138. *         first/last position in the file.  It also makes it easier to
  139. *         jump back and forth between two positions.
  140.  
  141. * @8   -  Jumps to next position marker in the file currently being
  142. *         edited.  Wraps within the current file when it hits the
  143. *         bottom of the file and no marker has been found from the
  144. *         starting position to the bottom.
  145.  
  146. * @f3  -  Jumps to previous position marker containing user selected
  147. *         *extension* in the file currently being edited.  The macro
  148. *         wraps within the current file.   If no marker extension has
  149. *         been selected and is active, this macro behaves like @7.
  150.  
  151. * @f4  -  Jumps to the next position marker containing user selected
  152. *         *extension* in the file currently being edited.  The macro
  153. *         wraps within the current file.  If no marker extension has
  154. *         been set with @f10, this macro behaves like @8.
  155.  
  156.  
  157. *     When a position marker is found by any of the above jump macros,
  158. *     the line containing the position marker is moved one line above
  159. *     the current display.  If a position marker is not found by any of
  160. *     the jump macros, the cursor remains at its original location, or
  161. *     at the beginning of the same line if searching backwards.
  162.  
  163.  
  164. * Four keys are provided to Delete, Set, Clear or Reset Position
  165. * Markers and Extensions:
  166.  
  167. * @9   -  Deletes all position marker label lines in the current file,
  168. *         including markers with extensions.
  169.  
  170. * @0   -  Deletes all position marker label lines in All currently
  171. *         loaded files, including all markers with extensions.
  172.  
  173. * @f9  -  Deletes all position marker label lines containing any
  174. *         *extension* in the current file.  Markers with an extension
  175. *         'g' are considered 'guarded' and are not removed with @f9.
  176. *         Guarded position markers can only be removed with @9 or @0.
  177.  
  178. * @f10 -  Sets, clears or resets the active marker *extension*.  If no
  179. *         marker extension has been set or after an extension has been
  180. *         cleared using @f10, markers containing extensions are
  181. *         accessed with all jump macros the same as markers without
  182. *         extensions.
  183.  
  184.  
  185. * A Few (Notes)
  186. * --------------
  187. *     a - All "Jump to Position Marker" macros, except the @function
  188. *         macros, do not set or use any blocks.  Block copies and moves
  189. *         can, therefore, be performed when jumping between marker
  190. *         positions.
  191.  
  192. *     b - Position marker label lines include an asterisk in column 1.
  193. *         This was done so that if the user inadvertently (or intent-
  194. *         ionally) does not delete the label line when saving the file,
  195. *         the label lines will be treated as comment by dBase, QConfig,
  196. *         QMac and QEdit (still need to watch out for comments the
  197. *         middle of multi-line statements!).  If you commonly use the
  198. *         macros for other languages (e.g., C source code files), you
  199. *         may want to change the "Set Position Marker" macros to use
  200. *         different initial characters.  The other macros should not
  201. *         need to be changed.
  202.  
  203. *     c - Ascii #224 must not exist in any loaded file to use @9, @0 or
  204. *         @f9.
  205.  
  206. *     d - The ring loading algorithm used in @5 and @6 is a
  207. *         modification a technique in a macro written by Kyle Watkins
  208. *         of SemWare.
  209.  
  210. *     e - If any file, other than the starting file, has the cursor in
  211. *         column 2, macros @5 and @6 may have to be invoked twice to
  212. *         jump to the desired pos marker across files.
  213.  
  214. *     f - All macros will fit on one line of Qconfig.dat.
  215.  
  216. *     g - These (macros) require QEdit v2.15.
  217.  
  218.  
  219.  
  220. *                            M A C R O S
  221. * ----------------------------------------------------------------------
  222. * @(1) Set Position Marker at Current Line
  223. * ----------- REVISED 13 bytes Wed  05-22-1991  12:42:54 ---------------
  224. @1  MacroBegin
  225.     InsertLine BegLine
  226.     "*" CursorRight #031 #030
  227. *
  228. * 14 bytes Mon  04-29-1991  23:34:56
  229. * 13 bytes Wed  05-22-1991  12:42:54 (TH - replaced space w/CursorRight)
  230.  
  231. * 
  232. * ----------------------------------------------------------------------
  233. * @(2) Set Position Marker at Top of Screen
  234. * ----------- REVISED 20 bytes Wed  05-22-1991  12:44:29 ---------------
  235. @2  MacroBegin
  236.     UnmarkBlock
  237.     DropAnchor DropAnchor       * Mark current Position
  238.     BegScreen
  239.     InsertLine BegLine          * Insert Blank Line
  240.     "*" CursorRight #031 #030   * Type Pos Marker Label
  241.     ScrollDown GotoBlockBeg
  242.     UnmarkBlock
  243. *
  244. * 21 bytes Tue  04-30-1991  00:40:51
  245. * 20 bytes Wed  05-22-1991  12:44:29 (TH - replaced space w/CursorRight)
  246.  
  247. * 
  248. * ----------------------------------------------------------------------
  249. * @(3) Jump to Previous Position Marker in Current File
  250. * ----------- REVISED 26 bytes Mon  05-04-1992  12:42:04 ---------------
  251. @3  MacroBegin
  252.     setscreenoff                                                           *|
  253.     BegLine ScrollUp BegScreen  * Move cursor in front of Marker in
  254.                                 *  case current screen is positioned
  255.                                 *  with marker right on top
  256.     Find
  257.     #031 #030 Return
  258.     "B" Return                  * Search backwards for next Marker
  259.     JTrue FOUND                 * If found, reposition & cleanup
  260.   NOTFOUND:                     *ELSE no Marker above where we are
  261.     PrevPosition                * Return cursor to our original position
  262.     JUMP END                    * End macro
  263.   FOUND:                        *ELSE no Marker in top of current file
  264.     MakeTopofScreen             * Put Marker line on top of screen
  265.   END:
  266.     ScrollDown                  * Remove marker line from view
  267. *
  268. * 25 bytes Fri  05-03-1991  02:06:08
  269. * 26 bytes Mon  05-04-1992  12:42:04 (TH @3, added setscreenoff)
  270.  
  271. * 
  272. * ----------------------------------------------------------------------
  273. * @(4) Jump to Next Position Marker in Current File
  274. * ----------- REVISED 18 bytes Mon  05-04-1992  12:42:08 ---------------
  275. @4  MacroBegin
  276.     setscreenoff                                                           *|
  277.     Find #031 #030 Return
  278.     DelLine Return              * Find Marker
  279.     JFalse END                  * If Marker found, end macro
  280.     MakeTopofScreen ScrollDown  * ELSE remove Marker from view
  281.  END:
  282. *
  283. * 17 bytes Mon  04-29-1991  23:33:46
  284. * 18 bytes Mon  05-04-1992  12:42:08 (TH @4, added setscreenoff)
  285.  
  286. * 
  287. * ----------------------------------------------------------------------
  288. * @(5) Jump to Previous Position Marker in Loaded Files
  289. * ----------- REVISED 56 bytes Fri  05-22-1992  03:28:20 ---------------
  290. @5  macrobegin
  291.     setscreenoff setsoundoff
  292.     begline scrollup begscreen  * Move cursor in front of Marker in
  293.                                 *  case current screen is positioned
  294.                                 *  with marker right on top
  295.     find #031 #030 return       * Search remainder of current file for
  296.     "b" return                  *   pos marker label, Find Backward
  297.     jtrue FOUND                 * If found, reposition & cleanup
  298.     prevposition                * Return cursor to original position
  299.     begline cursorright         * Put cursor to column 2                   *|
  300.     scrolldown                  *  and screen to original position
  301.   RINGLOOP:                     * Loop Through File Ring Until Marker
  302.                                 *   Found or Begin Point Reached
  303.     prevfile                    * Move back to orig file
  304.     find return "gb" return     * Search eof for pos marker and
  305.                                 *   retain cursor pos if not found
  306.     jtrue FOUND                 * If found, reposition & cleanup
  307.     cursorleft                  * Test if we can move cursor left
  308.     jfalse RINGLOOP             * If we can't, it's not the orig file,
  309.                                 * loop and move to next file
  310.     cursorleft                  * If we can move cursor left, test if we
  311.                                 *   can do it again
  312.     jtrue ringloop              * If we can, we are not in the orig file,
  313.                                 *   loop and move to next file
  314.     find return "gb" return     *ELSE search orig eof for pos marker and
  315.                                 *   retain cursor pos if not found
  316.     jfalse END                  * End if orig file has no markers on bot   *|
  317.   FOUND:
  318.     maketopofscreen             *ELSE position label line at top of screen
  319.     scrolldown                  * Remove it from View
  320.   END:
  321. *
  322. * 65 bytes Mon  04-29-1991  23:47:06
  323. * 77 bytes Sun  05-19-1991  20:26:05 (TH)
  324. * 77 bytes Thu  05-21-1992  09:55:58 (TH @5, converted to Nul cursorleft)
  325. * 56 bytes Fri  05-22-1992  03:28:20 (TH @5, removed Nul cursorleft)
  326.  
  327. * 
  328. * ----------------------------------------------------------------------
  329. * @(6) Jump to Next Position Marker in Loaded Files
  330. * ----------- REVISED 46 bytes Fri  05-22-1992  03:31:31 ---------------
  331. @6  macrobegin
  332.     setscreenoff setsoundoff
  333.     begline cursorright         * Put cursor to column 2 of current file   *|
  334.     find #031 #030 return       * Search remainder of current file for
  335.     delline return              *   for marker label, find forward
  336.     jtrue FOUND                 * If found, reposition & cleanup
  337.   RINGLOOP:                     * Loop Through File Ring Until Marker
  338.                                 *   Found or Begin Point Reached
  339.     nextfile                    * Move to next file in ring
  340.     find return "g" return      * Search file for pos marker and
  341.                                 *   retain cursor pos if not found
  342.     jtrue FOUND                 * If found, reposition & cleanup
  343.     cursorleft                  * Test if we can move cursor left
  344.     jfalse RINGLOOP             * If we can't, it's not the orig file,
  345.                                 * loop and move to next file
  346.     cursorleft                  * If we can move cursor left, test if we
  347.                                 *    can do it again
  348.     jtrue RINGLOOP              * If we can, we are not in the orig file,
  349.                                 *   loop and move to next file
  350.     find return "g" return      *ELSE search orig file for pos marker and
  351.                                 *   retain cursor pos if not found
  352.     jfalse END                  * End if orig file has no markers on top   *|
  353.   FOUND:
  354.     maketopofscreen             *ELSE position label line at top of screen
  355.     scrolldown                  * Remove it from View
  356.   END:
  357. *
  358. * 57 bytes Tue  04-30-1991  00:45:00
  359. * 69 bytes Sun  05-19-1991  20:25:47 (TH)
  360. * 68 bytes Thu  05-21-1992  12:27:28 (TH @6, converted to Nul cursorleft)
  361. * 46 bytes Fri  05-22-1992  03:31:31 (TH @6, removed Nul cursorleft)
  362.  
  363. * 
  364. * ----------------------------------------------------------------------
  365. * @(7) Jump to Previous Position Marker in Current File, Wraps File
  366. * ----------- REVISED 34 bytes Thu  05-21-1992  12:27:32 ---------------
  367. @7  MacroBegin
  368.     setscreenoff setsoundoff                                               *|
  369.     BegLine ScrollUp BegScreen  * Move cursor in front of Marker in
  370.                                 *  case current screen is positioned
  371.                                 *  with marker right on top
  372.     Find                        * Search
  373.     #031 #030 Return "B" Return *  backwards for Marker
  374.     JTrue FOUND                 * If found, reposition & cleanup
  375.     Prevposition                *ELSE if not found,
  376.     Find Return "GB" Return     * Do global search from bottom up
  377.                                 * Keeps starting cursor position
  378.                                 *  if no marker in file
  379.     Jfalse END                  * Test if not found, end macro
  380.   FOUND:                        *ELSE marker was found
  381.     MakeTopofScreen             * Position Label Line at Top of Screen
  382.   END:
  383.     ScrollDown                  * Remove it from View
  384. *
  385. * 32 bytes Sat  05-04-1991  01:36:19
  386. * 34 bytes Thu  05-21-1992  12:27:32 (TH @7, added setscreenoff/setsoundoff)
  387.  
  388. * 
  389. * ----------------------------------------------------------------------
  390. * @(8) Jump to Next Position Marker in Current File, Wraps File
  391. * ----------- REVISED 29 bytes Thu  05-21-1992  12:22:50 ---------------
  392. @8  MacroBegin
  393.     setscreenoff setsoundoff                                               *|
  394.     Find                        * Search Down for Pos Marker Label
  395.     #031 #030 Return
  396.     DelLine Return
  397.     JTrue FOUND                 * If found, reposition & cleanup
  398.     BegFile                     * If Not, Start at Top of File
  399.     RepeatFind                  * and Repeat the Search
  400.     JTrue FOUND                 * If found, reposition & cleanup
  401.     PrevPosition                * No Label in File, Return to
  402.     MakeCtrofScreen             * orig Position and Center
  403.     Jump END
  404.  FOUND:                         * Label Was Found
  405.     MakeTopofScreen             * Position Label Line at Top of Screen
  406.     ScrollDown                  * Remove it from View
  407.  END:
  408. *
  409. * 28 bytes Fri  05-03-1991  02:48:51
  410. * 27 bytes Thu  10-03-1991  12:36:54 (TH @8)
  411. * 29 bytes Thu  05-21-1992  12:22:50 (TH @8, added setscreenoff/setsoundoff)
  412.  
  413.  
  414. * 
  415. * ----------------------------------------------------------------------
  416. * @(9) Delete All Position Markers in Current File
  417. * ----------- REVISED 33 bytes Thu  05-21-1992  12:23:24 ---------------
  418. @9  MacroBegin
  419.     setscreenoff setsoundoff                                               *|
  420.     InsertLine #224             * Insertline w/weird character
  421.   FILELOOP:                     * Loop until all Markers are deleted
  422.     Find #031 #030 Return       * Search file for next pos marker
  423.     "G" Return                  * Retain cursor pos if not found
  424.     JFalse FILECLEAN            * Pos marker not found, exit loop
  425.     DelLine                     * Pos marker found, del line
  426.     Jump FILELOOP               * See if more Markers in current file
  427.   FILECLEAN:                    * File now clean of Markers
  428.     Find #224 Return "G" Return * Search file for begin point Marker
  429.     DelLine                     * Delete line w/weird character
  430. *
  431. * 31 bytes Mon  04-29-1991  23:34:45 (TH @9)
  432. * 33 bytes Thu  05-21-1992  12:23:24 (TH @9, added setscreenoff/setsoundoff)
  433.  
  434.  
  435. * 
  436. * ----------------------------------------------------------------------
  437. * @(0) Delete All Position Markers in ALL Loaded Files
  438. * ----------- REVISED 38 bytes Wed  05-20-1992  11:50:13 ---------------
  439. @0  MacroBegin
  440.     setsoundoff                                                            *|
  441.     InsertLine #224             * InsertLine w/Weird Character
  442.   RINGLOOP:                     * Loop Through File Ring Until
  443.                                 *   Begin Point Reached
  444.     setscreenon setscreenoff                                               *|
  445.     NextFile                    * Edit Next File in Ring
  446.   FILELOOP:                     * Loop Until All Markers in
  447.                                 *   File are Deleted
  448.     Find                        * Search File
  449.     #031 #030  Return           *   for Next pos marker
  450.     "G" Return                  *   Retain Cursor Pos If Not Found
  451.     JFalse FILECLEAN            * Pos markers Not Found, Exit Loop
  452.     DelLine                     * Pos marker found, del line
  453.     Jump FILELOOP               * See if More Markers in Current File
  454.   FILECLEAN:                    * File Now Clean of Markers
  455.     Find                        * Search File
  456.     #224 Return                 *   for Begin Point Marker
  457.     "G" Return
  458.     JFalse RINGLOOP             * Begin Point Not Found, Try Next File
  459.                                 * If Here, All Markers Deleted and
  460.                                 *   Back to Starting Point
  461.     DelLine                     * Delete line with Marker in Original File
  462. *
  463. * 35 bytes Tue  04-30-1991  00:53:21 (TH @9)
  464. * 38 bytes Wed  05-20-1992  11:50:13 (TH @0, added setsoundoff/setscreenoff)
  465.  
  466.  
  467. * 
  468. * 1
  469. * ----------------------------------------------------------------------
  470. * @(f1) Set Position Marker With Extension at Current Line
  471. * ----------- REVISED 30 bytes Thu  06-04-1992  13:32:36 ---------------
  472. @f1 macrobegin
  473.     insertline begline
  474.     "*" cursorright #031 #030
  475.     getscrbuff "e" return       * Get ext
  476.     endline jtrue HASEXT        * Test if ext set
  477.     unmarkblock                                                            *|
  478.     markcolumn markcolumn       *ELSE ext not set, mark ext
  479.     pause                       * Pause to insert ext
  480.     storescrbuff "e" return     * Store ext to buff "e"
  481.   HASEXT:
  482.     unmarkblock                 * Unmark ext
  483. *
  484. * 29 bytes Sun  05-24-1992  21:10:31 (TH @f1)
  485. * 30 bytes Thu  06-04-1992  13:32:36 (TH @f1, added unmarkblock)
  486.  
  487.  
  488. * 
  489. * 1
  490. * ----------------------------------------------------------------------
  491. * @(f2) Set Position Marker With Extension at Top of Screen
  492. * ----------- REVISED 39 bytes Thu  06-04-1992  13:32:27 ---------------
  493. @f2 macrobegin
  494.     begscreen
  495.     insertline begline          * Insert Blank Line
  496.     "*" cursorright #031 #030   * Type Pos Marker Label
  497.     getscrbuff "e" return       * Get ext
  498.     endline jtrue HASEXT        * Test if ext set
  499.     unmarkblock markcolumn      *ELSE ext not set, begin block             *|
  500.     pause                       * Pause to insert ext
  501.     cursorleft                  * Pos cursor to make ext a bl
  502.     storescrbuff "e" return     * Store ext to buff "e"
  503.   HASEXT:
  504.     unmarkblock                 * Unmark ext
  505.     scrolldown                  * Remove marker line from view
  506.     cursordown 11               * Pos cursor center of screen
  507. *
  508. * 38 bytes Sun  05-24-1992  22:20:04 (TH @f2)
  509. * 39 bytes Thu  06-04-1992  13:32:27 (TH @f2, added unmarkblock)
  510.  
  511. * 
  512. * 1
  513. * ----------------------------------------------------------------------
  514. * @(f3) Jump to Previous Position Marker With Extension in Current File,
  515. *       Wraps File
  516. * ----------- REVISED 70 bytes Mon  05-25-1992  20:57:34 ---------------
  517. @f3 MacroBegin
  518.     setscreenoff setsoundoff
  519. * --------------- Search For Pos Marker With Extension ---------------*
  520.     getscrbuff "e" return       * Get ext
  521.     jfalse NOEXT                * Test if ext set
  522.     cut                         * If so, cut to scrap for find
  523.     BegLine ScrollUp BegScreen  * Move cursor in front of marker in
  524.                                 *  case current screen is positioned
  525.                                 *  with marker right on top
  526.     Find                        * Search backward
  527.     #031 #030                   *   for pos marker
  528.     paste                       *   with ext
  529.     Return "B" Return
  530.     JTrue FOUND                 * If found, reposition & cleanup
  531.     prevposition                *ELSE No pos marker w/ext in File,
  532.                                 *  return to where we started
  533.     scrolldown
  534.     Find Return "GB" Return     * Do global search from bottom up
  535.                                 * Keeps starting cursor position
  536.                                 *  if no marker in file
  537.     jtrue FOUND
  538.   NOEXT:
  539. * -- Pos Marker With Ext Does Not Exist, Search for Marker w/no Ext --*
  540.     BegLine ScrollUp BegScreen  * Move cursor in front of marker in
  541.                                 *  case current screen is positioned
  542.                                 *  with marker right on top
  543.     Find                        * Search
  544.     #031 #030 Return "B" Return *  backwards for Marker
  545.     JTrue FOUND                 * If found, reposition & cleanup
  546.     Prevposition                *ELSE if not found,
  547.     Find Return "GB" Return     * Do global search from bottom up
  548.                                 * Keeps starting cursor position
  549.                                 *  if no marker in file
  550.     Jfalse END                  * Test if not found, end macro
  551.   FOUND:                        *ELSE marker was found
  552.     MakeTopofScreen             * Position Label Line at Top of Screen
  553.   END:
  554.     ScrollDown                  * Remove it from View
  555. *
  556. * 70 bytes Mon  05-25-1992  20:57:34 (TH @f3)
  557.  
  558. * 
  559. * 1
  560. * ----------------------------------------------------------------------
  561. * @(f4) Jump to Next Position Marker With Extension in Current File,
  562. *       Wraps File
  563. * ----------- REVISED 55 bytes Sun  05-24-1992  21:11:38 ---------------
  564. @f4 MacroBegin
  565.     setscreenoff setsoundoff
  566. * --------------- Search For Pos Marker With Extension ---------------*
  567.     getscrbuff "e" return       * Get ext
  568.     jfalse NOEXT                * Test if ext set
  569.     cut                         * If so, cut to scrap for find
  570.     find                        * Search forward
  571.     #031 #030                   *   for pos marker
  572.     paste return                *   with ext
  573.     delline return
  574.     jtrue FOUND                 * If found, reposition & cleanup
  575.     begfile                     * If not, start at top of file
  576.     repeatfind                  * and repeat the search
  577.     jtrue FOUND                 * If found, reposition & cleanup
  578.     prevposition                *ELSE no pos marker w/ext in File,
  579.                                 *  return to where we started
  580.   NOEXT:
  581. * -- Pos Marker With Ext Does Not Exist, Search for Marker w/no Ext --*
  582.     Find                        * Search Down for Pos Marker Label
  583.     #031 #030 Return
  584.     DelLine Return
  585.     JTrue FOUND                 * If found, reposition & cleanup
  586.     BegFile                     * If Not, Start at Top of File
  587.     RepeatFind                  * and Repeat the Search
  588.     JTrue FOUND                 * If found, reposition & cleanup
  589.     PrevPosition                * No Label in File, Return to
  590.     MakeCtrofScreen             * orig Position and Center
  591.     Jump END
  592.  FOUND:                         * Label Was Found
  593.     MakeTopofScreen             * Position Label Line at Top of Screen
  594.     ScrollDown                  * Remove it from View
  595.  END:
  596. *
  597. * 55 bytes Sun  05-24-1992  21:11:38 (TH @f4)
  598.  
  599. * g
  600. * 1
  601. * ----------------------------------------------------------------------
  602. * @(f9) Delete All Position Markers With Extensions in Current File
  603. *       Except 'Guarded' Markers, Does Not Delete Position Markers
  604. *       Without Extensions
  605. * ----------- REVISED 65 bytes Mon  05-25-1992  00:38:05 ---------------
  606. @f9 MacroBegin
  607.     setscreenoff setsoundoff
  608.     InsertLine #224             * Insertline w/weird character
  609.     begfile
  610.   FILELOOP:                     * Loop until all Markers are deleted
  611.     Find #031 #030 Return       * Search file for next pos marker
  612.     delline Return              *   forward
  613.     JFalse FILECLEAN            * Pos marker not found, exit loop
  614.     cursorright cursorright
  615.     endline
  616.     jfalse FILELOOP             * Test if marker has ext
  617.     begline
  618.     unmarkblock markline
  619.     find "g" return "IL" return * Test if guarded marker with "g" ext
  620.     jtrue GUARD                 * Do not delete guarded markers with "g" ext
  621.     delline                     * Delete non-guarded marker with ext
  622.   GUARD:
  623.     begline cursordown          * Move down one line from guarded marker
  624.     Jump FILELOOP               * Test if more Markers in current file
  625.   FILECLEAN:                    * File now clean of Markers with ext
  626.     Find #224 Return "G" Return * Search file for begin point Marker
  627.     cursorright
  628.     unmarkblock markcolumn      * Mark empty block
  629.     storescrbuff "e" return     * Clear scratch buff "e"
  630.     cut                         * Clear scrap buffer
  631.     DelLine                     * Delete line w/weird character
  632.     makectrofscreen
  633. *
  634. * 65 bytes Mon  05-25-1992  00:38:05 (TH @f9)
  635.  
  636. * 
  637. * 1
  638. * ----------------------------------------------------------------------
  639. * @(f10) Set, Clear or Reset Position Marker Extension
  640. * ----------- REVISED 29 bytes Sun  05-24-1992  22:59:52 ---------------
  641. @f10 macrobegin
  642.     setinsmode toggleinsert
  643.     insertline begline
  644.     "*" cursorright #031 #030
  645.     getscrbuff "e" return       * Get ext
  646.     unmarkblock
  647.     markcolumn markcolumn       * Mark ext
  648.     pause                       * Pause to delete or overwrite ext
  649.     storescrbuff "e" return     * Store ext to buff "e"
  650.     delline
  651.     toggleinsert
  652. *
  653. * 29 bytes Sun  05-24-1992  22:59:52 (TH @f10)
  654.  
  655. * 
  656. * ----------------------------------------------------------------------
  657. * @(h) Jump To Macro or Item in Index
  658. * ----------------------------------------------------------------------
  659. * This macro is used to quickly jump to a macro or item in this file:
  660. *     1. Press Alt and h at the same time.  Line 1 is marked to
  661. *        highlight. Cursor down to desired line in Index.
  662. *     2. Press Enter.  The macro then jumps to the first word
  663. *        cursor line in the document below.
  664. *
  665. * See BOOKxx.QM for other macros to jump to positions in and across files.
  666.  
  667. @h macrobegin
  668.         unmarkblock defaultwordset begfile endpara markline begfile
  669.         find "(" return "L" return
  670.     jfalse NOMARK  makectrofscreen begfile
  671.         unmarkblock markline markline prevposition begline
  672.         pause wordright markword copy endpara
  673.         find "(" paste ")" return "I" return
  674.     jfalse NOMARK  begline maketopofscreen scrollup jump END
  675.     NOMARK: begfile END:
  676. *
  677. * 52 bytes Wed  07-31-1991  14:43:31 (TH @4 in BOOKxx.QM)
  678.  
  679.  
  680. * (Other) AMAC Macros
  681. * --------------------
  682. * See AMACxx.ZIP and ALLMACRO.INF for many other QEdit macros.
  683.  
  684.  
  685. * (Version) History
  686. * ------------------
  687. *   1.0     May 3,  1991  Initial.
  688. *   1.0a    May 4,  1991  Changed @7 to return to starting position if
  689.                           no marker found.
  690. *   1.0b    May 4,  1991  Description of @4 and @5 were switched.  Corrected.
  691. *   1.0c    May 10, 1991  Minor documentation changes.
  692. *   1.1     May 19, 1991  Modified @5 and @6 to use scratch buffer test
  693. *                         for all file and cursor position cases.
  694. *   1.1a    May 22, 1991  Shortened @1 and @2 one byte each.
  695. *   1.1b    Oct 3,  1991  Corrected documentation.  Added @h.
  696. *   1.1c    Feb 17, 1992  Corrected documentation.
  697. *           Mar 28, 1992  In AMAC42.ZIP.
  698. *   1.2     May 20, 1992  Added setscreenon|off to @3-0 for QEdit v2.15.
  699. *           May 21, 1992  Modified @5 and @6 for correct ring position
  700. *                         in case Nul file was loaded before invoking.
  701. *                         Blocks are maintained jumping to and deleting
  702. *                         positions.  Added setsoundoff to @5-0.
  703. *           May 21, 1992  Sent to All #3/848-851.
  704. *   1.3     May 22, 1992  Shortened @5 and @6 by not using Nul file.
  705. *           May 24, 1992  Added @f1/2/3/4/9/10 for position markers w/extn's.
  706. *                       (In Amac43.zip)
  707. *   1.3a    June 4, 1992  Added unmarkblock to @f1 and @f2.             6/4/92
  708. *
  709. *
  710. *
  711. *
  712. *-- eof
  713.